package com.xydtech.ecard.ftp.enums;

/**
 * @Author: liliya
 * @Description:
 * ftp_deposit_loan_rate_config
 *   `config_name` varchar(10) DEFAULT NULL COMMENT '期限中文名称'
 * @Date: Created in 2023/8/16 19:36
 * @Modified:
 */

public enum FtpDepositLoanRateConfigKeyEnum {

    N_0("隔夜","0/N"),
    W_1("1周","1W"),
    W_2("2周","2W"),
    M_1("1个月","1M"),
    M_3("3个月","3M"),
    M_3_6("3个月到6个月","3M6M"),
    M_6("6个月","6M"),
    M_6_12("6个月到12个月","6M12M"),
    M_9("9个月","9M"),
    Y_1("1年","1Y"),
    Y_2("2年","2Y"),
    Y_3("3年","3Y"),
    Y_5("5年","5Y"),
    Y_10("10年","10Y"),
    Y_15("15年","15Y"),
    Y_20("20年","20Y"),
    Y_30("30年","30Y");

    private String configName;
    private String configKey;

    FtpDepositLoanRateConfigKeyEnum(String configName, String configKey) {
        this.configName = configName;
        this.configKey = configKey;
    }

    public String getConfigName() {
        return configName;
    }

    public String getConfigKey() {
        return configKey;
    }


    public static FtpDepositLoanRateConfigKeyEnum values(String key){
        for(FtpDepositLoanRateConfigKeyEnum enums : FtpDepositLoanRateConfigKeyEnum.values()){
            if(enums.getConfigKey().equals(key)){
                return enums;
            }
        }
        return null;
    }

}
